<%@ page import="pojo.User" %>
<%@ page language="java" pageEncoding="UTF-8"%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
	body {
		margin: 0px;
		background-color: #ffffff;
		font-size: 12px;
		color: #000000;
	}
	.height1{width:100%; height:74px; }
	.img_logo{
		min-width:100%;
		max-width:100%;
		height:74px;
	}
	.height2{
		width: 100%;
	}
	.height2 p{
		width: 300px;
		height: 30px;
	}
	.p1{
		float: left;
		margin-left: 30px;
	}
	.p2{
		float: right;
		margin-right: 30px;
	}
	.clearfix:after{
		content: "";
		height: 0;
		overflow: hidden;
		display: block;
		visibility: hidden;
	}

</style>
<link href="${pageContext.request.contextPath}/resources/css/Style.css" rel="stylesheet" type="text/css">

<script type="text/javascript">
	function exitSys() {
		var flag = window.confirm("确认退出系统吗?");
		if (flag) {
            window.top.open('', '_parent', '');
            window.top.close();
            window.top.location.href = "${pageContext.request.contextPath}/ToLoginServlet";
		}
	}
</script>
</head>
<body>
	<div class="height1">
		<img class="img_logo" src="${pageContext.request.contextPath}/resources/images/top_bg.jpg">
	</div>
	<div class="height2 clearfix">
		<p class="p1">
			<font color="#000000">
				<script language="JavaScript">
					tmpDate = new Date();
					date = tmpDate.getDate();
					month = tmpDate.getMonth() + 1;
					year = tmpDate.getFullYear();
					document.write(year);
					document.write("年");
					document.write(month);
					document.write("月");
					document.write(date);
					document.write("日 ");

					myArray = new Array(6);
					myArray[0] = "星期日";
					myArray[1] = "星期一";
					myArray[2] = "星期二";
					myArray[3] = "星期三";
					myArray[4] = "星期四";
					myArray[5] = "星期五";
					myArray[6] = "星期六";
					weekday = tmpDate.getDay();
					if (weekday == 0 || weekday == 6) {
						document.write(myArray[weekday])
					} else {
						document.write(myArray[weekday])
					};
				</script>
			</font>
		</p>
		<p class="p2">
			<%
				User user = (User)request.getSession().getAttribute("user");
			%>
			<span>登录成功！欢迎你：<%=user.getUsername()%></span>
			<font color="blue" style="display: inline-block;margin-left: 10px;">
				<a href="javascript:void(0)" onclick="exitSys()">退出系统</a>
			</font>
		</p>
	</div>
</body>
</html>
